package com.yfqy.admin.domain.mapper;

import com.yfqy.admin.domain.dto.product.ProductSkuDTO;
import com.yfqy.admin.domain.entity.ProductSku;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductSkuMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ProductSku record);

    int insertSelective(ProductSku record);

    ProductSku selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ProductSku record);

    int updateByPrimaryKey(ProductSku record);

    int insertBatch(@Param("skus") List<ProductSku> skus);

    List<ProductSkuDTO> selectSkuDTOsBySpuId(@Param("spuId") Long spuId);

    List<ProductSku> selectSkusBySpuId(@Param("spuId") Long id);

    int batchDeleteByIds(@Param("skuIds") List<Long> skuIds, @Param("modifiedBy") Long modifiedBy);

    int batchUpdate(@Param("batchUpdate") List<ProductSku> batchUpdate, @Param("modifiedBy") Long modifiedBy);
}